/*
 * Copyright (C) 2009 M. Hautle.
 * 
 * This file is part of TrackedBean.
 * 
 * TrackedBean is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * TrackedBean is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License along with TrackedBean. If not, see <http://www.gnu.org/licenses/>.
 */
package ch.trackedbean.data;

import ch.trackedbean.copier.annotations.*;
import ch.trackedbean.data.converter.*;
import ch.trackedbean.data.validator.*;
import ch.trackedbean.validator.annotations.*;

/**
 * DTO for {@link DomA}.
 * 
 * @author M. Hautle
 */
@SourceClass(DomA.class)
@ValidateContent(TOABusinessValidator.class)
public class TOA {
    /**
     * Property constant for {@link #getNumber()}/{@link #setNumber(int)}. Type {@link int}.
     */
    public static final String ATTR_NUMBER = "number";

    /**
     * Property constant for {@link #getTextA()}/{@link #setTextA(String)}. Type {@link String}.
     */
    public static final String ATTR_TEXT_A = "textA";

    /**
     * Property constant for {@link #getGetterA()}/{@link #setGetterA(String)}. Type {@link String}.
     */
    public static final String ATTR_GETTER_A = "getterA";

    /**
     * Property constant for {@link #getNumberA()}/{@link #setNumberA(int)}. Type {@link int}.
     */
    public static final String ATTR_NUMBER_A = "numberA";

    /** Simple number with field validation. */
    private int numberA;

    /** Simple text with field validation. */
    private String textA;

    /** Property annotated on getter. */
    private String getterA;

    /** Property to convert from String to int. */
    @SimpleMapping(value = DomA.ATTR_NUMBER, converter = StringToInt.class)
    private int number;

    /**
     * @return Returns the number.
     */
    public int getNumber() {
        return number;
    }

    /**
     * @param number The number to set.
     */
    public void setNumber(int number) {
        this.number = number;
    }

    /**
     * @return Returns the numberA.
     */
    public int getNumberA() {
        return numberA;
    }

    /**
     * @param numberA The numberA to set.
     */
    public void setNumberA(int numberA) {
        this.numberA = numberA;
    }

    /**
     * @return Returns the textA.
     */
    public String getTextA() {
        return textA;
    }

    /**
     * @param textA The textA to set.
     */
    public void setTextA(String textA) {
        this.textA = textA;
    }

    /**
     * @return Returns the getter.
     */
    public String getGetterA() {
        return getterA;
    }

    /**
     * @param getter The getter to set.
     */
    public void setGetterA(String getter) {
        this.getterA = getter;
    }
}
